package com.jk.util;

import java.util.Calendar;
import java.util.Date;

/**
 * 时间计算工具类
 *
 * @author 高紫腾
 * @create 2017-12-22 9:06
 **/
public class GetDateInfo {

    public static Date getPastDate(int data) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) - data);
        Date today = calendar.getTime();
        return today;
    }
}
